<extend name="public/base"/>

<block name="header">
    <li class="success"><a href="javascript:;">安装协议<img src="__IMG__/bullet_green.png" /></a></li>
    <li class="success"><a href="javascript:;">环境检测<img src="__IMG__/bullet_green.png" /></a></li>
    <li class="active"><a href="javascript:;">创建数据库</a></li>
    <li><a href="javascript:;"><eq name="Think.session.update" value="1">升级<else/>安装</eq></a></li>
    <li><a href="javascript:;">完成</a></li>
</block>

<block name="body">
<div class="container" id="step3">
	<div id="logo"  style="min-height:50px">&nbsp;</div>
	<div class="main">
		<?php
			defined('SAE_MYSQL_HOST_M') or define('SAE_MYSQL_HOST_M', '127.0.0.1');
			defined('SAE_MYSQL_HOST_M') or define('SAE_MYSQL_PORT', '3306');
		?>
		<fieldset class="layui-elem-field layui-field-title">
		  <legend>创建数据库</legend>
		</fieldset>
		<form action="__SELF__" method="post" class="layui-form layui-form-pane">
			
			<div class="layui-form-item">
				<label class="layui-form-label">数据库连接类型</label>
				<div class="layui-input-block">
				<select name="dbtype" lay-filter="aihao">
					<option>mysql</option>
					<option>mysqli</option>
				</select>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">数据库服务器</label>
				<div class="layui-input-block">
					<input type="text" name="dbhost" lay-verify="required" required autocomplete="off" placeholder="请输入数据库地址" value="<defined name='SAE_MYSQL_HOST_M'>{$Think.const.SAE_MYSQL_HOST_M}<else/>127.0.0.1</defined>" class="layui-input">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">数据库名</label>
				<div class="layui-input-block">
					<input type="text" name="dbname" lay-verify="required" required autocomplete="off" placeholder="请输入数据库名" value="<defined name='SAE_MYSQL_DB'>{$Think.const.SAE_MYSQL_DB}</defined>" class="layui-input">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">数据库用户名</label>
				<div class="layui-input-block">
					<input type="text" name="dbuser" lay-verify="required" required autocomplete="off" placeholder="请输入数据库用户名" value="<defined name='SAE_MYSQL_USER'>{$Think.const.SAE_MYSQL_USER}</defined>" class="layui-input">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">数据库密码</label>
				<div class="layui-input-block">
					<input type="text" name="dbpass" lay-verify="required" required autocomplete="off" placeholder="请输入数据库密码" value="<defined name='SAE_MYSQL_PASS'>{$Think.const.SAE_MYSQL_PASS}</defined>" class="layui-input">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">数据库端口</label>
				<div class="layui-input-block">
					<input type="text" name="dbport" lay-verify="required" required autocomplete="off" placeholder="请输入数据库端口" value="<defined name='SAE_MYSQL_PORT'>{$Think.const.SAE_MYSQL_PORT}<else/>3306</defined>" class="layui-input">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">数据表前缀</label>
				<div class="layui-input-block">
					<input type="text" name="dbpre" lay-verify="required" required autocomplete="off" placeholder="请输入数据表前缀" value="qn_" class="layui-input">
				</div>
			</div>
			<fieldset class="layui-elem-field layui-field-title">
			  <legend>管理员设置</legend>
			</fieldset>
			<div class="layui-form-item">
				<label class="layui-form-label">用户名</label>
				<div class="layui-input-block">
					<input type="text" name="adminuser" lay-verify="title" required autocomplete="off" placeholder="请输入用户名" value="" class="layui-input">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">密码</label>
				<div class="layui-input-block">
					<input type="text" name="adminpass" lay-verify="pass" required autocomplete="off" placeholder="请输入密码" value="" class="layui-input">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">确认密码</label>
				<div class="layui-input-block">
					<input type="text" name="adminpass1" lay-verify="pass" autocomplete="off" required placeholder="请输入密码" value="" class="layui-input">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">邮箱</label>
				<div class="layui-input-block">
					<input type="text" name="adminemail" lay-verify="email" autocomplete="off" required placeholder="请输入标题" value="" class="layui-input">
				</div>
			</div>
		<fieldset class="layui-elem-field layui-field-title">
		  <legend></legend>
		</fieldset>
		<div class="layui-form-item">
			<button class="layui-btn layui-btn-radius layui-btn-primary" onclick="javascript:location.href='{:U('Install/step2')}'">返回上一步</button>
			<button class="layui-btn layui-btn-radius layui-btn-normal" lay-submit="" lay-filter="install">立即提交</button>
		</div>
		</form>
	</div>
</div>
</block>

<block name="footer">
</block>